import { UserRoleType } from '@prisma/client';
import { IsBoolean, IsEnum, IsNotEmpty, IsNumber, IsOptional, IsString } from 'class-validator';

export class GetListDto {
  @IsOptional()
  roleKey: string;

  @IsNotEmpty()
  @IsNumber()
  page: number;

  @IsNotEmpty()
  @IsNumber()
  pageSize: number;

  @IsNotEmpty()
  @IsEnum(UserRoleType)
  roleType: UserRoleType;

  @IsOptional()
  @IsString()
  duration: string;

  @IsOptional()
  @IsBoolean()
  isUsed: boolean;

  @IsOptional()
  @IsBoolean()
  flat: boolean;
}
